package com.bwie.coupon.sync;

import com.bwie.coupon.mapper.MlUserCouponMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class Timer {
    @Autowired
    private MlUserCouponMapper mlUserCouponMapper;

    /**
     * 定时器
     */
    @Scheduled(cron = "* * * * * 1 ")
    public void  test(){
        //删除优惠卷已过期数据 (只保留近一年数据)
        mlUserCouponMapper.deleteMlUserCoupon();
    }
}
